home *** CD-ROM | disk | FTP | other *** search
/ CD School House 9 / CD School House 9.0 - Wayzata Technology (1994).iso / pc / dos / math / procalc / procalc.doc < prev    next >
Text File  |  1994-03-05  |  22KB  |  535 lines

  1.         
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.                  P r o C A L C
  23.  
  24.  
  25.  
  26.              Designed and written by
  27.  
  28.       Robert D. Miller  and  William A. Osterhagen
  29.             
  30.              February, 1988
  31.  
  32.  
  33. Introduction
  34.  
  35.     Welcome to ProCALC!  More than just a handy tool for
  36. arithmetic calculations, ProCALC solves a wide variety of
  37. algebraic, trigonometric and technical problems using arithmetic
  38. operations and more than fifty pre-defined functions. In
  39. addition, ProCALC permits user-defined formulas and named
  40. variables which may be saved to disk and later reused.
  41. Technical users will appreciate the precision and wide range
  42. of floating point numbers: all calculations are done in 80-bit
  43. floating point whether the numeric processor (8087, 287 or 387)
  44. chip is installed or not. Functions are accurate to very near
  45. the arithmetic limits.
  46.  
  47.     Programmers will find ProCALC especially useful
  48. since it will do exact arithmetic on long (32-bit)
  49. integers, has a full set of logical operators, and does
  50. bit manipulation. Additional number bases of two, eight,
  51. and sixteen may be used in calculations. For financial work
  52. and planning, a set of calendar functions are an integral
  53. part of ProCALC.
  54.  
  55.     To use ProCALC:
  56.  
  57.     For monochrome, enter PROCALC    or PROCALC <filename>
  58.  
  59.     For color, enter      PROCALC /C or PROCALC <filename>/C
  60.  
  61. where <filename> loads a file, created from some previous
  62. ProCALC session, containing user-defined variables and/or
  63. formulas. If your computer is in color mode, ProCalc will
  64. begin using color. Some computers (such as the AT&T 6300)
  65. having a green or amber screen look better if forced into
  66. a monochrome mode.  ProCalc will run in a monochrome mode
  67. by typing: PROCALC /M.
  68.  
  69.     If you have a numeric coprocessor chip installed, this
  70. program will automatically use it. Otherwise, ProCALC will
  71. fully emulate the 8087 chip.
  72.  
  73.     ProCALC greets you with its calculator screen -- you're
  74. ready to start calculating. For example, key in 1 + 2 + 3 and
  75. press <ENTER> to obtain the result of 6. We'll talk about details
  76. later, but for now observe the screen layout.  The ProCALC
  77. screen is divided into four separate areas:
  78.  
  79.     1) the uppermost FORMULA edit area,
  80.     2) the middle CALCULATE edit area,
  81.     3) the lower RESULT or message area,
  82.     4) the bottom FUNCTION key descriptions.
  83.  
  84.     The bottom two lines of the screen define the function keys as:
  85.  
  86.  F1: CALC
  87.      Clears calculate edit area and enters calculate edit mode
  88.      for entering and/or editing a new calculator problem.
  89.  
  90.  F2: ReCALC
  91.      Recalls the last calculator problem entered for editing
  92.      and/or re-calculation.
  93.  
  94.  F3: VARIABLES
  95.      Displays user-defined variables and their values.
  96.  
  97.  F4: FORMULAS
  98.      Displays user-defined formulas and their names.
  99.  
  100.  F5: GetFormula
  101.      Used to make, recall, delete, or change a formula.
  102.  
  103.  F6: UseFormula
  104.      Executes the current formula from the FORMULA area.
  105.  
  106.  F7: Degrees/Radians
  107.      Specifies how trigonometric angles are entered
  108.      and displayed.
  109.  
  110.  F8: Scientific/Floating Point result
  111.      Toggles between scientific notation and floating
  112.      point display. Shift F8 in floating point mode
  113.      increments the number of digits displayed in the
  114.      fraction by 2 each time it is pressed.
  115.  
  116.  
  117.  F9: RESULT
  118.      Specifies how results are displayed:
  119.        Dec (decimal)
  120.      # Bin (binary)
  121.      & Oct (octal)
  122.      $ Hex (hexadecimal)
  123.          # ExR (Extended precision Real), binary 80-bit
  124.                representation used by the numeric processor chip.
  125.                Full software emulation is provided if the ship
  126.                is not installed.
  127.        DMS (degrees or hours, minutes, seconds).
  128.  
  129.  F10: HELP
  130.       Displays list of operators, constants, and functions.
  131.  
  132.     At any time while the calculator screen is displayed, you
  133. may press the FUNCTION keys <F3: VARIABLES>,  <F4: FORMULAS> or
  134. <F10: HELP>.  Doing so interrupts your current work and displays
  135. the appropriate data on a blank screen.  If multiple screens of
  136. information are available, they are displayed by continuing to
  137. press the same function key. Pressing the function key after
  138. observing the last page returns to the calculator screen.
  139. Pressing <ESC> immediately returns you to the calculator
  140. screen -- exactly where you were when you originally pressed the
  141. function key. The Help screens may be paged forward and backward
  142. using the Page Up and Page Down keys.
  143.  
  144.     You can tell which part of the screen you're using by the
  145. highlighted area name. If none are highlighted, the bottom of the
  146. screen informs you how to load or save user-defined variables
  147. and/or formulas to or from disk.  More about this later.
  148.  
  149. CALCULATE
  150.  
  151.     You begin a calculator problem by pressing <F1: CALC> or by
  152. starting to key in the problem. <F2: ReCalc> displays the last
  153. problem you entered and allows you to edit and/or re-calculate
  154. it. When you're done editing, press <ENTER> and the answer is
  155. displayed in the RESULT area. The solution  is displayed in the
  156. base specified by <F9: RESULT>. You have three lines (of 74
  157. characters per line) to work with in the CALCULATE edit area.
  158. Edit keys include:
  159.  
  160.     <ARROW> ..... Moves the cursor up, down, left, or right.
  161.     <DELETE>..... Deletes the character under the cursor.
  162.     <INSERT>..... Turns on/off the character insert mode.
  163.     <BACK SPACE>. Deletes the character preceding the cursor.
  164.     <HOME>....... Moves the cursor to leftmost position of the
  165.           current line.
  166.     <END>........ Moves the cursor to the rightmost position
  167.           of the current line.
  168.     <CTRL END>... Clears from the cursor to the end of the line.
  169.     <ESC>........ Exits the edit mode with no calculation.
  170.     <ENTER>...... Displays calculated results in the result area.
  171.  
  172. USER VARIABLES:
  173.  
  174.     Calculated results can be saved as user-defined variables
  175. (use <F3: VARIABLES> for the current user-variable list) and
  176. variables may be used in subsequent calculations. A user variable
  177. must begin with a letter and cannot exceed 12 letters and/or
  178. digits in length. Variable names may not be pre-defined operator,
  179. function, constant, or formula names. The results of the current
  180. calculation may be saved in a user-defined variable by starting
  181. the problem with the user variable name and an equal sign (=).
  182. The last calculated result is saved in a user-defined variable by
  183. entering the variable name followed by equals (=).
  184.     For example:
  185.  
  186.     MYVAR = 1 + 2 + 3 <ENTER> . . . displays result of 6
  187.                     saved in MYVAR.
  188.  
  189.     Or another way:
  190.  
  191.     1 + 2 + 3 <ENTER> . . . . . . . gives a result of 6.
  192.     MYVAR = . . . . . . . . . . . . assigns the previous result
  193.                     (6) in MYVAR.
  194.  
  195.     The user-defined variable MYVAR may now be used in other
  196. calculator problems.  For example, after trying one of the above
  197. examples:
  198.  
  199.     9 * MYVAR <ENTER> . . . . . . . returns a result of
  200.                     54, or 9 * 6.
  201.  
  202.     A user-defined variable is deleted from the user-variable
  203. list by entering the user-defined variable followed by a minus
  204. (-). A complete list of user-defined variables may be displayed
  205. at any time by pressing the <F3: VARIABLES> function key.
  206.  
  207.     The at sign, @, is as a special variable which holds the result
  208. of the previous calculation. You may use it like any other variable.
  209.  
  210. USER FORMULAS:
  211.  
  212.     Formulas are defined using operators, functions, constants,
  213. and/or user variables. A formula must be defined before it is
  214. used. As with variable names, a formula name may not be that of a
  215. predefined operator, function, constant or user-defined variable.
  216.  
  217.     You define a formula by pressing  <F5: GetFormula> and typing
  218. the formula name.  Then press <ENTER> and key the formula just as
  219. though you were entering a calculator problem. Once you've edited
  220. the formula, press <ENTER> to save the definition in the formula
  221. list. You can press <F4: FORMULAS> at any time to see your
  222. formula list.
  223.  
  224.     If you press <ESC> while entering either a formula name or a
  225. formula, the formula name returns to  < n o n e >, the formula
  226. edit area remains intact, and you exit the formula area.  If the
  227. formula name you enter is already present in the formula list,
  228. that formula is displayed for editing.  If a formula name is all
  229. spaces and you press <ENTER>, a formula name of  < n o n e >  is
  230. displayed, the formula edit area is cleared, and you exit the
  231. formula area.
  232.     You execute a formula in one of the following three ways:
  233.  
  234.     1) The formula displayed in the FORMULA area is executed by
  235.        pressing the <F6: UseFormula> function key. Note: if a
  236.        formula is not present in the FORMULA area, the formula's
  237.        name is  < n o n e >;
  238.  
  239.     2) By entering in the CALCULATE area the name of an existing
  240.        formula and pressing <ENTER>;
  241.  
  242.     3) By entering a variable, followed by an equals sign (=),
  243.        followed by a formula name and pressing <ENTER>.  The
  244.        result of the formula calculation is then displayed and
  245.        saved in that variable.
  246.  
  247.     A formula is executed much the same as if it were a normal
  248. calculator problem. If a variable appearing in your formula is
  249. not defined (i.e., not in the user-variable list), then the
  250. CALCULATE area is highlighted and you are asked to key in the
  251. variable's value. You can type in numerical value, or even an
  252. arithmetic expression -- except that you may not use another
  253. formula name or assign the result to a variable with an equal (=)
  254. sign.  This step is repeated for each undefined variable in the
  255. formula being executed.
  256.  
  257.     Here, as an example, is the formula for calculating the
  258. length of the hypotenuse of a right triangle (using the
  259. Pythagorean theorem). To request the triangle's two sides at the
  260. time of execution, you could use ProCALC as described below.
  261.  
  262.     1) Press <F5: GetFormula>;
  263.     2) Key in a name (ex: Pyth) and press <ENTER>;
  264.     3) Key in the formula:
  265.        SQRT ( OneSide ^ 2 + OtherSide ^ 2 ) <ENTER>;
  266.     4) Press <F6: UseFormula>;
  267.     5) When `CALCULATE: OneSide' is highlighted,
  268.        key  300 <ENTER>;
  269.     6) When `CALCULATE: OtherSide' is highlighted,
  270.        key  400 <ENTER>;
  271.     7) The RESULT 500 is displayed.
  272.  
  273.     In the above example, instead of keying in the number 300
  274. for OneSide, you could have typed in any complex expression.
  275.  
  276.     Also, if `OneSide' or `OtherSide' had already been assigned a
  277. value (i.e., if either were a previously defined user variables),
  278. then ProCALC would have used that value instead of asking
  279. for it.
  280.  
  281.     You may modify and save an existing formula under a new name.
  282. First, call the formula with <F5: GetFormula>. Edit it, press
  283. <ESCAPE>, and press <F5: Getformula> again. Enter the new name
  284. and hit <ENTER> -- then press <ENTER> again to save the edited
  285. formula into the user formula list. To delete a formula from the
  286. formula list, simply press <F5: GetFormula> and type the name of
  287. the formula to be deleted followed by minus sign (-).
  288.  
  289. NUMBERS:
  290.  
  291.     Numbers may be entered as you ordinarily would with any
  292. calculator. Integers are numbers with no decimal fraction and
  293. they may range from -2147483648 to 2147483647. ProCALC will
  294. do exact operations on integers.  The integer operators
  295. DIV and MOD will do exact division and remainders. For example:
  296. 22 DIV 7 gives a result of 3, since the fraction is dropped.
  297. Entering: 22 MOD 7, returns the remainder, 1, since 22 divided
  298. by 7 is 3, remainder 1. The logical operators (AND, OR, XOR,
  299. NOT, IMP and EQV) and the shift operators (ASHIFT, SHIFT, ROTATE)
  300. do bit-by-bit operations on integers.
  301.  
  302.     Floating point or real numbers may be entered with a
  303. decimal point. Scientific notation may be used, where the
  304. 'E' (or 'e') following the number means "times ten to the power".
  305. One thousand may be entered as: 1000.0, or 1.0E3. ProCALC's
  306. floating point numbers have a very large dynamic range
  307. (the difference between the largest and smallest numbers).
  308. The largest number is roughly 1.18973e4932. The smallest non-
  309. zero number is about 1.0e-4931. Since the constants pi (3.14...),
  310. halfpi, and twopi are used frequently, you only have to
  311. remember to type in those names; ProCalc knows their values
  312. to the full precision of the computer.
  313.  
  314.     For computer programmers, particularly, integers may be
  315. entered in three other commonly used bases: 2 (binary),
  316. 8 (octal) and 16 (hexadecimal). Prefixing a number with
  317. # interprets the number as binary (and accepts only the digits
  318. 0 and 1). Beginning a number with & means it's octal
  319. (using digits 0 through 7) and using $ treats the number
  320. as hexadecimal, permitting digits 0 through 9 as well
  321. as A through F (for the hex digits 10 through 15).
  322. For example, entering #1001 (binary) is equivalent to
  323. the decimal number 9. The octal number &207 is 135 in
  324. base ten. Very large binary, octal or hexadecimal numbers
  325. (outside the range plus or minus two billion) are permitted
  326. in ProCALC, although the logical and shift operators
  327. shouldn't be used with them, since they are processed as
  328. floating point numbers. Just make the leading digit a 0.
  329. For example $0FFFFCAF900 is the decimal number 1099508152576.
  330.  
  331. DISPLAY RESULTS:
  332.  
  333.     The default mode for results is scientific notation. For example:
  334. 0.00234 is displayed as 2.34000000e-3. You can use the <F8> key to
  335. toggle to the floating point display mode. An indicator shown by
  336. the <F8> selection at the bottom of the ProCALC screen shows "Sci"
  337. for the scientific notation and an "Fpt" for floating point.
  338. Notice when the "Fpt" is selected, a number following that indicator
  339. tells how many digits past the decimal point will be printed.
  340. The displayed number is correctly rounded to that precision.
  341. The number of fraction digits displayed may be increased by 2
  342. each time the <SHIFT F8> is pressed. After reaching a maximum of
  343. 14 digits, the <SHIFT F8> will recycle through the number of digits.
  344.  
  345.     Occasionally, the results may not fit the selected option.
  346. In such situations, the number is displayed "the best way".
  347. Integers will always be shown with no decimal point.
  348.  
  349.     ProCALC works with an incredibly large range of numbers.
  350. It is possible for some results to exceed this range. Numbers
  351. larger than 1.0e4932 are regarded and displayed as "infinity".
  352. Extremely small numbers may result as "unnormal" or "denormal";
  353. these may be safely regarded as zero. Some complex operations
  354. or error conditions may result in a number that can not be
  355. expressed, in which case "NAN" (not a number) is displayed.
  356. ProCALC tries very hard to catch error conditions and gracefully
  357. recover from these somewhat peculiar situations; it actually
  358. does much better than many mathematical computer programming
  359. languages!
  360.  
  361.     Several other display options may be selected with the
  362. <F9> key. Integer results may be chosen to be shown in binary,
  363. octal or hexadecimal. Pressing <F9> repeatedly cycles through
  364. the list of options; while <SHIFT F9> returns to decimal display.
  365. For those of you who need to know what the numeric processor is
  366. doing, an ExR (Extended Real) display option is included. 
  367. The DMS option prints output in degrees, minutes and
  368. seconds; when using DMS, be sure to remember to select Degrees 
  369. mode with <F7>. The DMS display mode is very handy when working
  370. with calculations involving time, to get hours, minutes and seconds.
  371.  
  372.     A note on the Extended Real display format: the ExR selection
  373. displays a number as it is in the numeric processor You aren't
  374. required to have one to use this option. A complete description of
  375. this format is in the Intel reference manuals for the 8086 and
  376. later processors. Briefly, the number is displayed in five 16-bit
  377. groups. the first group is the exponent (biased by 16383 or hex 3FFF).
  378. The first bit is the sign. This format uses a signed magnitude
  379. representation, so negative numbers are just like positive ones,
  380. only having the first bit set to 1. Try entering PI and -PI and
  381. observe the difference. The remaining four groups are the 64 bits
  382. of the mantissa. The binary point is taken to be after the first
  383. mantissa bit (which for normalized numbers is a 1). Displaying PI
  384. in this mode you get:
  385.  
  386.     01000000 00000000 11001001 00001111 11011010 10100010
  387.                       00100001 01101000 11000010 00110101
  388.  
  389. The first group contains the exponent. The first bit is zero,
  390. so the number is positive. The exponent is biased by hex 3FFF or
  391. 16383, so to get the true exponent, subtract the bias. Ok,
  392. #0100000000000000 - #0011111111111111 is 1. The first sixteen bits
  393. of the fraction are 1100100100001111. Remembering the binary point
  394. comes after the high order bit, so the first part of the mantissa
  395. is really 1.100100100001111 which is about decimal 1.57077.
  396. Since the binary exponent is 1, the number is the mantissa
  397. multiplied by 2^1 or 2. The first sixteen bits of the fraction
  398. multiplied by one power of 2 give 1.57077 * 2 = 3.14154, not
  399. a bad approximation to pi. The remaining bits just provide
  400. additional precision.
  401.  
  402. PRINTING:
  403.  
  404.     ProCALC can print the results of a calculation on your printer.
  405. After doing a calculation, pressing <Alt> and P simultaneously
  406. will print the lines of the calculate edit entry area and the results.
  407. An <Alt> F will print the displayed formula. This option may not
  408. work on a few of the "near compatibles", such as the Tandy 1000.
  409. Of course, the shift print screen will print any page entirely
  410. and may be useful for making a printed list of variables and
  411. formulas displayed with the <F3> and <F4> keys.
  412.  
  413. LOADING and SAVING:
  414.  
  415.     ProCALC lets you save your variables and formulas to disk.
  416. After completing a calculation, a message displayed at the bottom
  417. of the screen reminds you how to save and load user files.
  418. Variables and formulas are SAVED to disk by pressing `S' while
  419. holding down the <ALT> key. You'll be prompted to enter the
  420. filename. When saving user variables and/or formulas to disk,
  421. all user-defined variables and formulas are copied to disk in a
  422. single file.  The disk files containing formulas and variables
  423. may be shared with other ProCalc users.
  424.  
  425.     Variables and formulas are LOADED in from disk by pressing
  426. `L' while holding down the <ALT> key. You will be prompted for
  427. the name of the file to be loaded. When loading a file of user
  428. variables and formulas in from disk, any variables and formulas
  429. already in memory are not disturbed.  When duplicate names are
  430. found, however, the variables and/or formulas loaded in from disk
  431. replace those in memory. When using the Load or Save feature, you
  432. may look at a disk directory by typing DIR. A file or pathname
  433. may be examined by entering, for example: DIR C:\PROCALC\*.DAT.
  434.  
  435. REMINDER, PLEASE:
  436.  
  437.     ProCALC is a unique and powerful time-saving tool which will
  438. serve a wide variety of users. A great deal of effort and care
  439. has gone into its preparation. It is our desire to make ProCALC
  440. available to the greatest possible number of users, we are
  441. distributing it as "shareware". We ask that you please register
  442. each copy of ProCALC for a reasonable fee of $20. We believe that
  443. ProCALC is worth far more than this. Please complete and return
  444. the registration/order form which is on the next page.
  445.  
  446.     ProCALC is distributed on a program disk as PROCALC.EXE with
  447. this user's guide on the file PROCALC.DOC, to copy to your printer.
  448.  
  449.     To register your copy, please complete the registration form
  450. (or send your name, address and computer model) along with $20
  451. for each copy to:
  452.  
  453.                     Robert Miller
  454.                     1837 Burrwood Circle
  455.                     East Lansing
  456.                     Michigan   48823.
  457.  
  458.     A new ProCalc disk and manual may be ordered for $30. When
  459. ordering, please specify standard floppy or the 3 1/2-inch format.
  460.  
  461.     We would like to know your needs. If a future version
  462. of this product were to be provided, what features would you use
  463. the most?  Would you like to see graphics incorporated, complex
  464. numbers and functions, vectors, matrices or extended precison
  465. arithmetic.  If you have particularly interesting or novel
  466. applications, we would like to hear from you too.
  467.  
  468. DISCLAIMER:
  469.  
  470.     The authors have made every effort to make ProCALC the best
  471. product possible. However, as we have no control over its use,
  472. we must state this disclaimer: The authors claim no responsibility
  473. for loss or damages resulting, either directly or indirectly
  474. from the use of this program.
  475.  
  476.     Should you find any aspect of this product undesirable, please
  477. let us know. If there is a problem, we will make every reasonable
  478. effort to correct it and send you a correction.
  479.  
  480. ACKNOWLEDGEMENTS:
  481.  
  482.     A number of friends and colleagues have provided encouragement
  483. and they have provided numerous suggestions along the way. To
  484. those people, we extend a sincere word of thanks. A special thanks
  485. to Tom Pennello of MetaWare, Inc. for providing assistance with
  486. their outstanding Professional Pascal compiler used for this product.
  487.  
  488.  
  489.  
  490.                    ProCALC ORDER/REGISTRATION FORM
  491.  
  492.  
  493.     Please check one of the following items and complete the questions
  494. below and return. The success of this product depends upon your use
  495. and support. Thank you.
  496.  
  497.  
  498.    ____ Please register my copy of ProCalc, which I have already
  499.         purchased.
  500.  
  501.    ____ Please register (_____) copies of ProCalc. The cost of
  502.         $ 20 per copy is enclosed.
  503.  
  504.    ____ Please send (_____)  ProCalc diskettes along with a
  505.         ProCalc User's Guide.  Enclosed is $ 30 per copy.
  506.  
  507.         Note:  Check here for  (____) 3 1/2-inch diskette
  508.  
  509.  
  510.         Register in the name (or ship to):
  511.  
  512.         Your name:
  513.  
  514.         Address:
  515.  
  516.         City:
  517.  
  518.         State:                        Zip:
  519.  
  520.  
  521.         Your computer make/model:
  522.  
  523.         Do you use a numeric coprocessor (8087, 80287 or 80387 chip)?
  524.  
  525.         Comments:
  526.  
  527.  
  528.  
  529.  
  530.         Please send to:     Robert Miller
  531.                             1837 Burrwood Circle
  532.                             East Lansing
  533.                             Michigan USA  48823
  534. 
  535.